<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <c:set var="ctx" value="${pageContext.request.contextPath}"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>查询征信记录</title>
    <jsp:include page="../../import.jsp" flush="true"/>
    <input type="hidden"  value="${prjId}"   name="prjId" id="prjId"/>

    <input type="hidden"  value="${isShowAc}"   name="isShowAc" id="isShowAc"/>
</head>
<script type="text/javascript">
    var grid = null;
    var addGSData_s = {};
    var addSONData_s = {};
    var prjId=$("#prjId").val();
    $(function () {
        var _url = '<%=path%>/riskctrl/rccstbscinfo/initList.do?certNo=${certNo }';
        $("#ligergrid1").ligerGrid({
            url: _url,
            method: 'get',
            columns: [
                {display: '类型', name: 'cstTypCdNm', align: 'left', width: 50},
                {display: '客户姓名', name: 'cstNm', align: 'left', width: 100},
                {display: '手机号', name: 'mp1', align: 'left', width: 100},
                {display: '证件号', name: 'certNo', align: 'left', width: 200},
                {display: '车牌号', align: 'left', width: 200,
                    render: function (rowdata, rowindex, value) {
                        var reg = /[;]/g;
                        if(rowdata.carNo==null){
                           return  rowdata.carNo;
                        }
                        var carNo=rowdata.carNo+"";
                        return carNo.replace(reg,"<br/>");
                    }
                },
                {
                    display: '有效性', align: 'left', width: 50,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.isValidNm == "有效") {
                            return '<font color="blue">'+rowdata.isValidNm+'</font>';
                        }
                        return rowdata.isValidNm;
                    }
                },
                {display: '复议', name: 'isReaudNm', align: 'center', width: 50},
                {
                    display: '评审结果', align: 'left', width: 200, isEllipsis: false,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.audStsDesc4 != null && rowdata.audStsDesc4 != 'null' && rowdata.audStsDesc4.indexOf("【工行】") == 0) {
                            return rowdata.audStsDesc4 + rowdata.audStsDesc;
                        } else {
                            return rowdata.audStsDesc;
                        }
                    }
                },

                {display: '验车方案', name: 'inspectionPlan', align: 'center', width: 300},
                {display: '经销商风险', name: 'splRiskInfo', align: 'center', width: 300},
                {display: '审批意见1', name: 'audOpinion', align: 'center', width: 200},
                {display: '审批意见2', name: 'audOpinion2', align: 'center', width: 200},
                {display: '用户级别', name: 'rskLvlCdNm', align: 'left', width: 50},
//                {display: '特别说明', name: 'cstRem', align: 'left', width: 150},
//                {display: '结果说明', name: 'audStsDesc2', align: 'left', width: 150},
                {display: '所属机构', name: 'cstMgrOrgCdNm', align: 'left', width: 100},
                {display: '省公司', name: 'prOrgCdNm', align: 'left', width: 150},
                {display: '分公司', name: 'cyOrgCdNm', align: 'left', width: 150},
                {display: '车型', name: 'prdTypCdNm', align: 'left', width: 50},
                {display: '贷款额（元）', name:'prdAmt', align: 'left', width: 150,},
                {display: '行驶证', name: 'driveIdHolderCdNm', align: 'left', width: 100},
                {display: '婚姻状况', name: 'marStsCdNm', align: 'center', width: 100},
                {display: '配偶/担保人信息', name: '', align: 'left', width: 150},
                {display: '经销商', name: 'splNm', align: 'left', width: 150},
                {display: '挂靠公司', name: 'channelNm', align: 'left', width: 150},
                {display: '含挂级别', name: 'rskLvlCd3Nm', align: 'center', width: 150},
                {display: '业务员', name: 'crtNm', align: 'left', width: 150},
                {display: '客户经理', name: 'cstMgrNm', align: 'left', width: 100},
                {display: '授权书', align: 'left', width: 150,
                    render: function (rowdata, rowindex, value){
                        var h;
                        h='<a href="javascript:uploadFileByUrl(';
                        h+="'"+rowdata.authFilePath+"'";
                        h+=",'"+rowdata.authFileNm+"'";
                        h+=')">'+rowdata.authFileNm+'</a>'
                        return h;
                    }
                },
                {display: '电子征信授权书', name: 'zxFilePath', align: 'center', width: 110,
                    render:function (rowdata, rowindex, value, column) {
                        if(rowdata.zxFilePathStatus == 1){
                            return '<a href="javascript:toGetPath('+"'"+rowdata.id+"'"+');" >查看征信授权书</a>';
                        }
                    }
                },
                {display: '短信状态', name: 'mpMsgCdNm', align: 'center', width: 150,

                },
                {display: '短信内容', name: 'mpMsgDesc', align: 'left', width: 150},
                {display: '身份证', align: 'center', width: 100,
                    render: function (rowdata, rowindex, value){
                        var h;
                        h='<a href="javascript:uploadFileByUrl(';
                        h+="'"+rowdata.idCardFilePath+"'";
                        h+=",'"+rowdata.idCardFileNm+"'";
                        h+=')">'+rowdata.idCardFileNm+'</a>'
                        return h;
                    }
                },
                {display: '状态', name: 'audStsCdNm', align: 'left', width: 80},
                {display: '时间', name: 'crtTm', align: 'center', width: 150, render: renderDate},
                {
                    display: '操作', width: 150, align: 'left',
                    render: function (rowdata, rowindex, value) {
                        var html =
                            '<sys:funcAuth resCd="cpshow2709"><a class="sq-button-hasicon" href="javascript:change(' + "'" + rowdata.id + "'," + "'" + rowdata.prdTyp + "'" + ',1)"><i class="sqBtnIco_4"></i>复议</a></sys:funcAuth>' +
                            '<sys:funcAuth resCd="cpshow2708"><a class="sq-button-hasicon" href="javascript:change(' + "'" + rowdata.id + "'," + "'" + rowdata.prdTyp + "'" + ',2)"><i class="sqBtnIco_4"></i>查看</a></sys:funcAuth>';
                        return html;
                    }
                }
            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            checkbox: false,
            rownumbers: true,
            frozen: false,
            allowUnSelectRow: true,
            alternatingRow: false,
            fixedCellHeight: false,
            onBeforeShowData: function () {
                var grid = this;
                grid.collapsedRows = [];
            },
            detail: {
                height: 'auto',
                onShowDetail: showDetail_grid
            }
        });
        grid = liger.get("ligergrid1");
        grid.setHeight(100);
        $("#searchBar").ligerForm();

        $("#searchBtn").click(function (event) {
            var form = new liger.get("searchBar");
            var data = form.getData();
            for (name in data) {
                grid.setParm(name, data[name]);
            }
            grid.reload();
        });
        $("#clearBtn").click(function (event) {
            // $("#resetBtn").click();  //重置 input-text
            clearQuery();
        });
        $("#exportBtn").click(function (event) {
            var form = new liger.get("searchBar");
            var data = form.getData();
            //时间校验
            if(!verifyDate(data)){
                return;
            }
            $.ajax({
                type: 'get',
                data:data,
                dataType: 'json',
                url: '<%=path%>/riskctrl/rccstbscinfo/exportRcCstBscInfo.do?certNo=${certNo }',
                beforeSend: function () {
                    wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                },
                success: function (msg) {
                    wait_dialog.close();
                    if (msg.success == 1) {
                        window.open(msg.data);
//                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
//                        grid.reload($('.pcontrol input', grid.toolbar).val());
                    } else {
                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                    }
                }
            });
        });

        // var isShowAc = $("#isShowAc").val();
        // if(isShowAc == "1"){
        //     calculate();
        // }


        //导出详情
        $("#exportDetailBtn").click(function (event) {
            var form = new liger.get("searchBar");
            var data = form.getData();
            if(!verifyDate(data)){
                return;
            }
            $.ajax({
                type: 'get',
                data:data,
                dataType: 'json',
                url: '<%=path%>/riskctrl/rccstbscinfo/exportRcCstBscInfoDetail.do?certNo=${certNo }',
                beforeSend: function () {
                    wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                },
                success: function (msg) {
                    wait_dialog.close();
                    if (msg.success == 1) {
                        window.open(msg.data);
//                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
//                        grid.reload($('.pcontrol input', grid.toolbar).val());
                    } else {
                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                    }
                }
            });
        });
    });
    //时间校验
    verifyDate = function (data){
        var begin = data.stDt;
        var end = data.endDt;
        var beginDate =new Date(begin);
        var endDate = new Date(end);
        var curr = new Date().getTime();
        var temp = DateUtils.getDateDiff(begin,end,"day");
        if(begin == ""||end ==""){
            $.ligerDialog.SQalert({content: "请选择时间!", SQ_type: "error"});
            return false;
        }
        if(beginDate.getTime()-endDate.getTime()>0){
            $.ligerDialog.SQalert({content: "开始时间不能大于结束时间!", SQ_type: "error"});
            return false;
        }
        if(curr-beginDate.getTime()<0||curr-endDate.getTime()<0){
            $.ligerDialog.SQalert({content: "开始或者结束时间不能大于当前时间!", SQ_type: "error"});
            return false;
        }
        var days=DateUtils.getDateDiff(begin,end,"day")
        if(days>31){
            $.ligerDialog.SQalert({content: "时间跨度不能超过31天!", SQ_type: "error"});
            return false;
        }
        return true;
    }

    function showDetail_grid(row, detailPanel, callback){
        showDetail_grid01(row, detailPanel, callback)
        showDetail_grid02(row, detailPanel, callback)

    }
    //客户关系明细列表
    function showDetail_grid01(row, detailPanel, callback){
        var gridBox = document.createElement('div');
        $(gridBox).css('margin', 10);
        $(detailPanel).css({
            'padding': 10,
            'box-sizing': 'border-box'
        }).append(gridBox);
        detailGrid = $(gridBox).ligerGrid({
            url: '<%=path%>/riskctrl/rccstbscinfo/initCstSocialList.do?cstId='+ row.id,
            method: 'get',
            columns: [
                {display: '姓名',name: 'rlNm',width: 180,align:'center'},
                {display: '性别', name: 'genderCdNm', width: 50, align: 'center'},
                {display: '客户关系', name: 'rlTypCdNm', width: 80, align: 'center'},
                {display: '出生日期',name: 'birthdayStr',width: 150,align:'center'},
                {display: '证件类型',name: 'certTypCdNm', width: 100,align:'center',},
                {display: '证件号', name: 'certNo', width: 180, align: 'center'},
                {display: '手机号码(1)', name: 'mp1', width: 180, align: 'center'},
                {display: '手机号码(2)', name: 'mp2', width: 180, align: 'center'},
                {display: '授权书', align: 'center', width: 150,
                    render: function (rowdata, rowindex, value){
                        var h;
                        h='<a href="javascript:uploadFileByUrl(';
                        h+="'"+rowdata.authFilePath+"'";
                        h+=",'"+rowdata.authFileNm+"'";
                        h+=')">'+rowdata.authFileNm+'</a>'
                        return h;
                    }
                },
                {display: '电子征信授权书', name: 'zxFilePath', align: 'center', width: 110,
                    render:function (rowdata, rowindex, value, column) {
                        if(rowdata.zxFilePathStatus == 1){
                            return '<a href="javascript:toGetPath('+"'"+rowdata.id+"'"+');" >查看征信授权书</a>';
                        }
                    }
                },
                {display: '身份证', align: 'center', width: 100,
                    render: function (rowdata, rowindex, value){
                        var h;
                        h='<a href="javascript:uploadFileByUrl(';
                        h+="'"+rowdata.idCardFilePath+"'";
                        h+=",'"+rowdata.idCardFileNm+"'";
                        h+=')">'+rowdata.idCardFileNm+'</a>'
                        return h;
                    }
                },
            ],
            root: 'rows',
            hideLoadButton : true,
            width: '100%',
            height: 'auto',
            isScroll: false,
            rownumbers:true,  //显示序号
            allowUnSelectRow:true,
            alternatingRow: false,
            onAfterShowData: callback,
            frozen: false,
            usePager: false
        });
    }
    //配偶征信
    function showDetail_grid02(row, detailPanel, callback){
        var gridBox = document.createElement('div');
        $(gridBox).css('margin', 10);
        $(detailPanel).css({
            'padding': 10,
            'box-sizing': 'border-box'
        }).append(gridBox);
        detailGrid = $(gridBox).ligerGrid({
            url: '<%=path%>/riskctrl/rccstbscinfo/initSpouseList.do?dataId='+ row.id,
            method: 'get',
            columns: [
                {display: '类型', name: 'cstTypCdNm', align: 'left', width: 50},
                {display: '客户姓名', name: 'cstNm', align: 'left', width: 100},
                {display: '手机号', name: 'mp1', align: 'left', width: 100},
                {display: '证件号', name: 'certNo', align: 'left', width: 200},
                {
                    display: '有效性', align: 'left', width: 50,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.isValidNm == "有效") {
                            return '<font color="blue">'+rowdata.isValidNm+'</font>';
                        }
                        return rowdata.isValidNm;
                    }
                },
                {display: '复议', name: 'isReaudNm', align: 'center', width: 50},
                {
                    display: '评审结果', align: 'left', width: 200, isEllipsis: false,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.audStsDesc4 != null && rowdata.audStsDesc4 != 'null' && rowdata.audStsDesc4.indexOf("【工行】") == 0) {
                            return rowdata.audStsDesc4 + rowdata.audStsDesc;
                        } else {
                            return rowdata.audStsDesc;
                        }
                    }
                },
                {display: '审批意见1', name: 'audOpinion', align: 'center', width: 200},
                {display: '审批意见2', name: 'audOpinion2', align: 'center', width: 200},
                {display: '用户级别', name: 'rskLvlCdNm', align: 'left', width: 50},
//                {display: '特别说明', name: 'cstRem', align: 'left', width: 150},
//                {display: '结果说明', name: 'audStsDesc2', align: 'left', width: 150},
                {display: '所属机构', name: 'cstMgrOrgCdNm', align: 'left', width: 100},
                {display: '省公司', name: 'prOrgCdNm', align: 'left', width: 150},
                {display: '分公司', name: 'cyOrgCdNm', align: 'left', width: 150},
                {display: '车型', name: 'prdTypCdNm', align: 'left', width: 50},
                {display: '贷款额（元）', name:'prdAmt', align: 'left', width: 150,},
                {display: '行驶证', name: 'driveIdHolderCdNm', align: 'left', width: 100},
                {display: '婚姻状况', name: 'marStsCdNm', align: 'center', width: 100},
                {display: '配偶/担保人信息', name: '', align: 'left', width: 150},
                {display: '经销商', name: 'splNm', align: 'left', width: 150},
                {display: '业务员', name: 'crtNm', align: 'left', width: 150},
                {display: '客户经理', name: 'cstMgrNm', align: 'left', width: 100},
                {display: '授权书', align: 'left', width: 150,
                    render: function (rowdata, rowindex, value){
                        var h;
                        h='<a href="javascript:uploadFileByUrl(';
                        h+="'"+rowdata.authFilePath+"'";
                        h+=",'"+rowdata.authFileNm+"'";
                        h+=')">'+rowdata.authFileNm+'</a>'
                        return h;
                    }
                },
                {display: '电子征信授权书', name: 'zxFilePath', align: 'center', width: 110,
                    render:function (rowdata, rowindex, value, column) {
                        if(rowdata.zxFilePathStatus == 1){
                            return '<a href="javascript:toGetPath('+"'"+rowdata.id+"'"+');" >查看征信授权书</a>';
                        }
                    }
                },
                {display: '短信状态', name: 'mpMsgCdNm', align: 'center', width: 150,

                },
                {display: '短信内容', name: 'mpMsgDesc', align: 'left', width: 150},
                {display: '身份证', align: 'center', width: 100,
                    render: function (rowdata, rowindex, value){
                        var h;
                        h='<a href="javascript:uploadFileByUrl(';
                        h+="'"+rowdata.idCardFilePath+"'";
                        h+=",'"+rowdata.idCardFileNm+"'";
                        h+=')">'+rowdata.idCardFileNm+'</a>'
                        return h;
                    }
                },
                {display: '状态', name: 'audStsCdNm', align: 'left', width: 80},
                {display: '时间', name: 'crtTm', align: 'center', width: 150, render: renderDate},
                {
                    display: '操作', width: 150, align: 'left',
                    render: function (rowdata, rowindex, value) {
                        var html =
                            '<sys:funcAuth resCd="cpshow2709"><a class="sq-button-hasicon" href="javascript:change(' + "'" + rowdata.id + "'," + "'" + rowdata.prdTyp + "'" + ',1)"><i class="sqBtnIco_4"></i>复议</a></sys:funcAuth>' +
                            '<sys:funcAuth resCd="cpshow2708"><a class="sq-button-hasicon" href="javascript:change(' + "'" + rowdata.id + "'," + "'" + rowdata.prdTyp + "'" + ',2)"><i class="sqBtnIco_4"></i>查看</a></sys:funcAuth>';
                        return html;
                    }
                },
            ],
            root: 'rows',
            hideLoadButton : true,
            width: '100%',
            height: 'auto',
            isScroll: false,
            rownumbers:true,  //显示序号
            allowUnSelectRow:true,
            alternatingRow: false,
            onAfterShowData: callback,
            frozen: false,
            usePager: false
        });
    }
    function uploadFileByUrl(_url,_name){
        if(SQ.regs.img.test(_name)){
            //SQ.imgPreview(_url);
            window.__ImgSrc = _url;
            window.__ImgTit = _name;
            window.open('<%=path%>/project/prjbscinfo/imgWinOpen.do', '', 'location=yes, width=800, height=600');
        }else{
            window.open(_url);
        }
    }

    // 查看
    function change(id, prdTyp, zx_flag) {
        if(!id)return;

        var desc = "";
        if(zx_flag == "1") {
            desc = "-复议";
        }
        if(zx_flag == "2") {
            desc = "-查看";
        }

        if (prdTyp == 1 ) {
            // 重卡
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "重卡传统前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toZkAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
        if (prdTyp == 2) {
            // 轻卡
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "轻卡前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toZkAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
        if (prdTyp == 5) {
            // 二手车
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "二手车前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toZkAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
        if (prdTyp == 4) {
            // 客车
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "客车前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toKcAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
        if (prdTyp == 7 ) {
            // 新能源
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "新能源前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toZkAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
        if (prdTyp == "cdd" ) {
            // 车抵贷（线上）
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "车抵贷（线上）前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toZkAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
        if (prdTyp == "cddunderline" ) {
            // 车抵贷（线下）
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "车抵贷（线下）前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toZkAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
        if (prdTyp == "lcv" ) {
            // 车抵贷（线下）
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "LCV前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toZkAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
        if (prdTyp == "yqxd" ) {
            // 车抵贷（线下）
            Add_navTab("toTripartitePage"+id+"_"+zx_flag, "疫情小贷前置征信审批"+desc, '<%=path%>/riskctrl/rccstbscinfo/toZkAudiPage.do?id='+id+'&zx_flag='+zx_flag);
        }
    }

    //格式化时间
    function renderDate(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
        }
        return dateStr;
    }
    function toGetPath(id){
        $.ajax({
            type: 'get',
            dataType: 'json',
            url: '<%=path%>/riskctrl/rccstbscinfo/getFilPath.do?filId='+id,
            success: function (msg) {
                if (msg.success == 1) {
                    window.open(msg.info)
                } else {
                    $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                }
            }
        });
    }

    var clickType=0;
    //初始化A卡详版信息
    <%--function calculate(){--%>
    <%--    // $("#aCardCPBeforeLabelNm").html("A卡信息加载中...");--%>
    <%--    AjaxUtils.ajaxGet("<%=path%>/riskctrl/acard/initList.do?prjId=${prjId}",null,initCalculateACard,false);--%>
    <%--}--%>
    //点击按钮 -计算A卡征信信息
    function reCalculate(){
        $("#tips").html("正在处理，请稍后...");
        clickType=1;
        // $("#aCardCPBeforeLabelNm").html("A卡信息加载中...");
        AjaxUtils.ajaxGet("<%=path%>/riskctrl/acard/calculateYsAcard.do?prjId=${prjId}",null,initCalculateACard, false);
    }

    //获取A卡结果后续处理
    function initCalculateACard(msg) {
        var json = (msg);
        var prjId = $("#prjId").val();
        if (1 == msg.success) {
            if (clickType == 1) {
                $.ligerDialog.SQalert({content: "操作成功!", SQ_type: "success"});
            }
            var calculateACardData = msg.data;
            // A卡简版数据
            if (null != calculateACardData.aCardSPResult) {
                $("#aCardSPLabelNm").html(calculateACardData.aCardSPLabelNm);
                $("#aCardSPResult").html(calculateACardData.aCardSPResult);
                $("#aCardSpResult_2").html(calculateACardData.aCardSpResult_2);
            }
            // A卡详版 before数据V2.0只有before数据
            if (null != calculateACardData.aCardCPBeforeResult) {
                $("#aCardCPBeforeLabelNm").html(calculateACardData.aCardCPBeforeLabelNm);
                $("#aCardCPBeforeResult").html(calculateACardData.aCardCPBeforeResult);
            }
            //A卡详版 after数据
            if(null!=calculateACardData.aCardCPAfterResult){
                $("#aCardCPAfterLabelNm").html(calculateACardData.aCardCPAfterLabelNm);
                $("#aCardCPAfterResult").html(calculateACardData.aCardCPAfterResult);
            }
        }
    }
    // 清空约束条件
    function clearQuery(){
        $("#cstNm").val("");  // 客户姓名
        $("#certNo3").val("");  // 证件号
        $("#mp").val("");  // 手机号
        $("#splNm").val("");  // 商家名称

        liger.get("audStsCd").setValue(" ");  // 评审状态
        liger.get("rskLvlCd").setValue(" ");  // 用户级别
        liger.get("isReaud").setValue(" ");  // 是否复议
        liger.get("prdTyp").setValue(" ");  // 车型
        liger.get("carNo").setValue(" ");  // 车牌号
        liger.get("cstMgrNm").setValue(" ");  // 客户经理
        liger.get("stDt").setValue(" ");  // 开始时间
        liger.get("endDt").setValue(" ");  // 结束时间
    }
</script>
<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
                <div class="fieldBox">
                    <div class="label">客户姓名</div>
                    <div class="field">
                        <input name="cstNm" id="cstNm" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">证件号</div>
                    <div class="field">
                        <input name="certNo3" id="certNo3" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">手机号</div>
                    <div class="field">
                        <input name="mp" id="mp" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">商家名称</div>
                    <div class="field">
                        <input name="splNm" id="splNm" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">评审状态</div>
                    <div class="field">
                        <select name="audStsCd" id="audStsCd" data-value=" ">
                            <option value=" " seleted>请选择</option>
                            <c:forEach items="${audStsCdDicList }" var="kv">
                                <option value="${kv.key }">${kv.value }</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">用户级别</div>
                    <div class="field">
                        <select name="rskLvlCd" id="rskLvlCd" data-value=" ">
                            <option value=" " seleted>请选择</option>
                            <c:forEach items="${usLevelDicList }" var="kv">
                                <option value="${kv.key }">${kv.value }</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">是否复议</div>
                    <div class="field">
                        <select name="isReaud" id="isReaud" data-value=" ">
                            <option value=" " seleted>请选择</option>
                            <c:forEach items="${yesNoDicList }" var="kv">
                                <option value="${kv.key }">${kv.value }</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">车型</div>
                    <div class="field">
                        <select name="prdTyp" id="prdTyp" data-value=" ">
                            <option value=" " seleted>请选择</option>
                            <c:forEach items="${prdTypDicList }" var="kv">
                                <option value="${kv.key }">${kv.value }</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">车牌号</div>
                    <div class="field">
                        <input name="carNo" id="carNo" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">客户经理</div>
                    <div class="field">
                        <input name="cstMgrNm" id="cstMgrNm" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">时间</div>
                    <div class="field">
                        <input name="stDt" id="stDt" type="text" class="ui-datepicker" value="">
                        <span>---</span>
                        <input name="endDt" id="endDt" type="text" class="ui-datepicker" value="">
                    </div>
                </div>
                <div class="fieldBox">
                    <div class="label">挂靠公司</div>
                    <div class="field">
                        <input name="channelNm" id="channelNm" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="clearFix"></div>
                <div class="btnsBox formBtns notRight">
                    <span id="searchBtn" class="sq-button-round">查询</span>
                    <span id="clearBtn" class="sq-button-round">清空</span>
                    <sys:funcAuth resCd="cpshow2710"><span id="exportBtn" class="sq-button-round">导出</span></sys:funcAuth>
                    <span id="reCalculate" onClick="reCalculate()" class="sq-button-round">获取A卡结果</span>
                    <%--<sys:funcAuth resCd="cpshow2711"><span id="exportDetailBtn" class="sq-button-round">信审台帐导出</span></sys:funcAuth>--%>

                    <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
                </div>
            </div>
            <div class="label" id="tips"> </div>
            <div class="label" id="aCardSPLabelNm"> </div>
            <div class="label" id="aCardSPResult"> </div>
            <div class="label" id="aCardSpResult_2"> </div>

            <div class="label" id="aCardCPBeforeLabelNm"> </div>
            <div class="label" id="aCardCPBeforeResult"> </div>

            <div class="label" id="aCardCPAfterLabelNm"> </div>
            <div class="label" id="aCardCPAfterResult"> </div>

<%--                <div id="reCalculateDiv" style ="display:none" class="btnsBox formBtns notRight">--%>
<%--                    <span id="reCalculate" onClick="reCalculate()" class="sq-button-round">获取A卡结果</span>--%>
<%--                </div>--%>
        </form>
    </div>
</div>
<div id="ligergrid1" class="sq-grid"></div>
</body>
</html>